﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BiffenService.Model;

namespace BiffenService.Db
{
    public interface IMemberDb
    {
        /// <summary>
        /// Method that inserts a member into the database
        /// </summary>
        /// <param name="name">String name the name of the new member</param>
        /// <param name="phone">int phone the phone number of the new member</param>
        /// <param name="email">String email the email address of the new memeber</param>
        /// <param name="Address">String address the address of the new member</param>
        /// <param name="zipcode">int zipcode the zipcode the new member lifes in</param>
        /// <param name="newsletter">bool newsletter true if the new member wants to recieve a newsletter, false if not</param>
        int InsertMemberIntoDatabase(string name, int phone, string email, string Address, int zipcode, bool newsletter);

        /// <summary>
        /// Method to find a member from the database with a specific id
        /// </summary>
        /// <param name="memberId">int memberId the id of the member we want to find</param>
        /// <returns>Member member the member found in the database</returns>
        Member FindMemberByIdFromDatabase(int memberId);

        /// <summary>
        /// Method that finds a Member by a phone number
        /// </summary>
        /// <param name="phone">int phone the members phone number</param>
        /// <returns>Member member the member found in the database</returns>
        Member FindMemberByPhone(int phone);


        #region . Login . 
        Login GetLoginByPhone(int phone);

        #endregion
    }
}
